package com.todolist.client.service;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.todolist.shared.domain.Task;

import java.util.ArrayList;

@RemoteServiceRelativePath("springGwtServices/taskService")
public interface TaskService extends RemoteService {

    Task getTask(String text);

    void addTask(Integer projectId, String text, Integer priority);

    void updateTaskText(String oldText, String newText);

    void updateTaskCompleteness(String text, Boolean completed);

    void updateTaskPriority(String text, Integer priority);

    void deleteTask(Integer projectId, String text);

    void deleteTasks(Integer projectId);

    ArrayList<Task> getTasks(Integer projectId);

    Integer getMaxTaskPriority();
}
